package com.leetcode.LC;

public class LC459 {
    public boolean repeatedSubstringPattern(String s) {

        for (int i = 1; i <= s.length() / 2; i++) {
            if (s.length()%i!=0) {
                continue;
            } else if (s.split(s.substring(0, i)).length == 0) {
                return true;
            }
        }
        return false;
    }

    public static void main(String[] args) {
        System.out.println(new LC459().repeatedSubstringPattern("abcabcabc"));

/*        String a="abcabcabc";
        String[] abcs = a.split("abc");
        System.out.println(abcs.length);*/
    }
}
